'''
字符串
'''
# 格式字符串 %s
# name = input()
# age = input()
# print('名字：%s，年龄：%s' % (name, age))
# format
print('我是{0}，年龄{1}，{1}岁'.format(10, 18))
list1 = [10, 30, 60]
print('{0[0]},{0[1]},{0[2]}'.format(list1))
stu = {'name': 'xiaom', 'age': 20, 'score': 100}
print('{name}今年{age}岁，分数{score}'.format(**stu))

# 相关方法：
print('-------------------------------------------')
str2 = 'dnakghjakngdskjnsd'
s1 = str2.capitalize()
print(s1)
s2 = 'abc'
print(s2.zfill(3))
s3 = 'can you help me, thank you, im from Tang empire'
print(s3.count('n'))
print(s3.index('y'))
print(s3.find('u'))
print('+'.join('ok'))
print(s3.replace('e','x'))
print('------------------------------')
print(s3.split(','))
